#!/usr/bin/ENV perl
use strict;
use MySchema;
my $schema = MySchema->connect(
    'dbi:mysql:X;localhost',
    'root',
    'nomaka',
    { AutoCommit => 1 },
);
$schema->storage->debug(1);

my @book_list = $schema->resultset('Book')->search(
    {},    
    {
        join => ['author']
    }
);

for my $row_object_book (@book_list){
    print 'Book: ', $row_object_book->id, ', author name is ';
    print $row_object_book->author->name;
    print "\n";
}
